package com.club.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Builder;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhangfc
 * @date 2022/12/12 15:40
 */
@Data
@TableName(value = "t_activity")
@Builder(toBuilder = true)
public class TActivity implements Serializable {
    private static final Long serialVersionUUID = 1L;
    /**
     * 活动主键
     */
    @TableId(value = "act_id",type = IdType.AUTO)
    private int actId;

    /**
     * 所属社团id
     */
    @TableField(value = "club_id")
    private int clubId;

    /**
     * 活动编号
     */
    @TableField(value = "act_number")
    private String actNumber;

    /**
     * 活动名称
     */
    @TableField(value = "act_name")
    private String actName;

    /**
     * 活动场地
     */
    @TableField(value = "act_address")
    private String actAddress;

    /**
     * 活动内容
     */
    @TableField(value = "act_message")
    private String actMessage;

    /**
     * 状态 0-审核中 1-审核通过 2-审核失败
     */
    @TableField(value = "act_status")
    private String actStatus;

    /**
     * 创建时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "createtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonSerialize(using = CustomDateTimeSerializer.class)
    @TableField(value = "modifytime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}
